package jsu.xxy.coffee3.mapper;

import jsu.xxy.coffee3.domain.SupplierAndMaterials;
import jsu.xxy.coffee3.domain.SupplierMaterial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
* @author 张从轩
* @description 针对表【supplier_material】的数据库操作Mapper
* @createDate 2023-06-03 11:06:06
* @Entity jsu.xxy.coffee3.domain.SupplierMaterial
*/
@Mapper
public interface SupplierMaterialMapper extends BaseMapper<SupplierMaterial> {

    @Select("select * from  supplier_material where supplierid=#{supplierid} and mid = #{id}")
    public List<SupplierMaterial> getByIds(int supplierid, int id);

    @Insert("INSERT into supplier_material (supplierid,mid,purchaseprice) values ( #{supplierid},#{mid},#{purchaseprice})")
    public int insertAll(SupplierMaterial supplierMaterial);
}




